home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Apple II Sample Code / APW.SC / SC14FontReport / FontReport.rez < prev    next >
Encoding:
Text File  |  1990-06-23  |  8.7 KB  |  263 lines  |  [TEXT/pdos]

  1. /*---------------------------------------------------------------*/
  2.  
  3. #include "types.rez"
  4.  
  5. /*------------------- Values used through out -------------------*/
  6.  
  7. #define CatalogWindow   $1000
  8. #define StrikeWindow    $1001
  9.  
  10.  
  11. /*----------------------- About Box ------------------------------*/
  12. resource rAlertString (1) {
  13.     "0\$19\$00\$A0\$00\$AA\$00\$E0\$01"
  14.     "0/"
  15.     TBCenterJust
  16.     TBStyleOutline
  17.     "Font Report"
  18.     TBEndOfLine
  19.     TBStylePlain
  20.     "A sample program to demonstrate program calls to the Apple IIGS Font Manager."
  21.     TBEndOfLine
  22.     TBEndOfLine
  23.     "by"
  24.     TBEndOfLine
  25.     "Dan Strnad"
  26.     TBEndOfLine
  27.     TBEndOfLine
  28.     "Copyright Apple Computer, Inc."
  29.     TBEndOfLine
  30.     "All Rights Reserved"
  31.     TBEndOfLine
  32.     "Version 3.0/^#6\$00"
  33. };
  34.  
  35.  
  36.  
  37.  
  38. /*----------------------Startup Record ---------------------------*/
  39. resource rToolStartup (1)   {
  40.     mode640,                            /* master SCB */
  41.     {   
  42.         3,$0300,                        /* misc tools */
  43.         4,$0301,                        /* quickdraw */
  44.         5,$0302,                        /* desk manager */
  45.         6,$0300,                        /* eventMgr */
  46.         7,$0200,                        /* scheduler */
  47. /*      8,$0301,                        /* sound tools */
  48. /*      9,$0201,                        /* ADB tools */
  49.         10,$0202,                       /* SANE */
  50.         11,$0200,                       /* int math */
  51.         12,$0201,                       /* Text Tool set */
  52.         14,$0301,                       /* Window Manager */
  53.         15,$0301,                       /* Menu Manager */
  54.         16,$0301,                       /* Control Manager */
  55.         17,$0300,                       /* System Loader */
  56.         18,$0301,                       /* QD Aux */
  57. /*      19,$0300,                       /* print manager */
  58.         20,$0301,                       /* LineEdit tool set */
  59.         21,$0302,                       /* Dialog Manager */
  60.         22,$0300,                       /* Scrap manager */
  61.         23,$0301,                       /* standard file */
  62. /*      25,$0104,                       /* NoteSynth */
  63. /*      26,$0104,                       /* Note Seq */
  64.         27,$0301,                       /* Font manager */
  65.         28,$0301,                       /* list manager */
  66. /*      29,$0101,                       /* ACE */
  67. /*      32,$0103,                       /* Midi Tools */
  68. /*      34,$0101                        /* text edit */
  69.     }
  70. };
  71.  
  72.  
  73.  
  74. /*---------------------------------------------------------------------------*/
  75. /*
  76. /* Font Catalog Window
  77. /*
  78. /* This is the template for the font catalog window
  79. /*
  80. /*---------------------------------------------------------------------------*/
  81. resource rWindParam1 (CatalogWindow) {
  82.     0xdda0,                                                 /* Frame Bits           */
  83.     0x201,                                                  /* title ID             */
  84.     0,                                                      /* ref Con              */
  85.     {0,0,0,0},                                              /* Zoom Rect            */
  86.     0,                                                      /* color table id       */
  87.     {0,0},                                                  /* origin               */
  88.     {800,640},                                              /* data size            */
  89.     {0,0},                                                  /* max height-width     */
  90.     {4,16},                                                 /* scroll amount, hor,ver */
  91.     {40,160},                                               /* page amount */
  92.     0,                                                      /* wInfo Ref Con */
  93.     0,                                                      /* wInfo height */
  94.     {25,20,170,500},                                        /* window Position */
  95.     0xffffffff,                                             /* wPlane */
  96.     Nil,                                                    /* Control Ref */
  97.     refIsResource*0x0100+resourceToResource                 /* descriptor */
  98. };
  99.  
  100. /*---------------------------------------------------------------------------*/
  101. /* This is the title of the font catalog window
  102. /*---------------------------------------------------------------------------*/
  103. resource rPString (0x201) {
  104.     "Font Catalog"
  105.     };
  106.  
  107.  
  108.  
  109. /*---------------------------------------------------------------------------*/
  110. /*
  111. /* Font Strike Window
  112. /*
  113. /* This is the template for the font strike window
  114. /*
  115. /*---------------------------------------------------------------------------*/
  116. resource rWindParam1 (StrikeWindow) {
  117.     0xdda0,                                                 /* Frame Bits           */
  118.     0x202,                                                  /* title ID             */
  119.     0,                                                      /* ref Con              */
  120.     {0,0,0,0},                                              /* Zoom Rect            */
  121.     0,                                                      /* color table id       */
  122.     {0,0},                                                  /* origin               */
  123.     {800,640},                                              /* data size            */
  124.     {0,0},                                                  /* max height-width     */
  125.     {4,16},                                                 /* scroll amount, hor,ver */
  126.     {40,160},                                               /* page amount */
  127.     0,                                                      /* wInfo Ref Con */
  128.     0,                                                      /* wInfo height */
  129.     {45,213,180,550},                                       /* window Position */
  130.     0xffffffff,                                             /* wPlane */
  131.     Nil,                                                    /* Control Ref */
  132.     refIsResource*0x0100+resourceToResource                 /* descriptor */
  133. };
  134.  
  135.  
  136. /*---------------------------------------------------------------------------*/
  137. /* This is the title of the font strike window
  138. /*---------------------------------------------------------------------------*/
  139. resource rPString (0x202) {
  140.     "Font Strike"
  141.     };
  142.  
  143.  
  144.  
  145. /* *************************************************************************  */
  146. /*
  147. /*          Menus
  148. /*
  149. /* This sample program uses menu items that start at 250. The Edit menu items */
  150. /* if they were present would be entered first to conform to the menu manager */
  151. /* documentation. The About and Quit menu items use IDs 256 and 257 as a      */
  152. /* convention.                                                                */
  153. /*                                                                            */
  154. /* *************************************************************************  */
  155.  
  156. #define AppleMenuID         $1100
  157. #define AboutID             $1101
  158. #define FileMenuID          $1200
  159. #define OpenCatWindowID     $1201
  160. #define OpenStrikeWindowID  $1202
  161. #define QuitID              257
  162. #define FontMenuID          $1300
  163. #define ChooseID            $1301
  164.  
  165.  
  166.  
  167. resource rMenuBar (1) {
  168.     {
  169.         AppleMenuID,
  170.         FileMenuID,
  171.         FontMenuID
  172.     };
  173. };
  174.  
  175. resource rMenu (AppleMenuID)    {
  176.     AppleMenuID,
  177.     RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  178.     AppleMenuID,
  179.     { AboutID };
  180. };
  181.  
  182. resource rMenu (FileMenuID) {
  183.     FileMenuID,
  184.     RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  185.     FileMenuID,
  186.     { OpenCatWindowID,
  187.     OpenStrikeWindowID,
  188.     QuitID };
  189. };
  190.  
  191. resource rMenu (FontMenuID) {
  192.     FontMenuID,
  193.     RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  194.     FontMenuID,
  195.     { ChooseID };
  196. };
  197.  
  198. resource rMenuItem (AboutID)    {
  199.     AboutID,
  200.     "","",
  201.     0,
  202.     RefIsResource*ItemTitleRefShift+fDivider,
  203.     AboutID
  204. };
  205.  
  206. resource rMenuItem (OpenCatWindowID)    {
  207.     OpenCatWindowID,
  208.     "","",
  209.     0,
  210.     RefIsResource*ItemTitleRefShift+fDisabled,
  211.     OpenCatWindowID
  212. };
  213.  
  214. resource rMenuItem (OpenStrikeWindowID) {
  215.     OpenStrikeWindowID,
  216.     "","",
  217.     0,
  218.     RefIsResource*ItemTitleRefShift+fDisabled,
  219.     OpenStrikeWindowID
  220. };
  221.  
  222. resource rMenuItem (QuitID) {
  223.     QuitID,
  224.     "Q","q",
  225.     0,
  226.     RefIsResource*ItemTitleRefShift,
  227.     QuitID
  228. };
  229.  
  230. resource rMenuItem (ChooseID)   {
  231.     ChooseID,
  232.     "C","c",
  233.     0,
  234.     RefIsResource*ItemTitleRefShift,
  235.     ChooseID
  236. };
  237.  
  238.  
  239. resource rPString (AppleMenuID) {
  240.     "@"
  241.     };
  242. resource rPString (FileMenuID) {
  243.     "  File  "
  244.     };
  245. resource rPString (FontMenuID) {
  246.     "  Font  "
  247.     };
  248. resource rPString (AboutID) {
  249.     "About Font Report..."
  250.     };
  251. resource rPString (OpenCatWindowID) {
  252.     "Open Font Catalog Window"
  253.     };
  254. resource rPString (OpenStrikeWindowID) {
  255.     "Open Font Strike Window"
  256.     };
  257. resource rPString (QuitID) {
  258.     "Quit"
  259.     };
  260. resource rPString (ChooseID) {
  261.     "Choose..."
  262.     };
  263.